package psn.kiko.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
@Slf4j
public class CronTask{
	//每隔10秒执行一次
	@Scheduled(cron="0/10 * * * * ?")
	public void task(){
		log.debug("cron指定的定时任务{}",LocalDateTime.now());
	}
}
